home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 24
/
AACD 24.iso
/
AACD
/
Information
/
WebSites
/
AmigaNorthThames
/
cgi-bin
/
news.pl
< prev
next >
Wrap
Perl Script
|
2001-04-21
|
4KB
|
188 lines
#!/usr/bin/perl
#############
# NewsDude Main Article script by Perlboy.org
#
# This script is Copyright (c) 2000 by Perlboy.org, Stuart Low all rights
# reserved. It may be used under the terms detailed in
# http://www.perlboy.org/scripts/license.html
#
# YOU MAY MODIFY THIS SCRIPT PROVIDED YOU LEAVE THE ABOVE COPYRIGHT HEADING
# INTACT AND THE "This script was provided by Perlboy.org" line at the footer of
# the News.pls output.
#
# Other than that, enjoy the script. I did it mainly for a dude on
# alt.www.webmaster but also just for a kick on my last day of exams.
#
# If you want to get in touch, mail me at thedude@perlboy.org
# I WILL NOT ANSWER SUPPORT QUESTIONS THOUGH.
# This is mainly done due to the fact that I am a school student
# and therefore cannot afford to offer support for my free scripts.
#
# Once again. Visit alt.www.webmaster there are MANY a soul who will
# happily help you.
#
# If you own a business and use this on your clients sites
# Could you please email me and tell me so that I can add your
# business to a list of Web Design firms which use my script
# Much appreciated
#
# Perlboy. (Stuart Low)
# thedude@perlboy.org
#
# ------------------------------------------------------------------
##############################################################################
require "vars.pl";
require "subs.pl";
($sec,$min,$hour,$mday,$mon,$year,$wday) = (localtime(time))[0,1,2,3,4,5,6];
$year += "1900";
$todays_date = "$mday\/$mon\/$year";
print "Content-Type: text/html\n\n";
open(NEWSFILE, "news.arch");
@News=<NEWSFILE>;
close(NEWSFILE);
if($outputtype eq 'detailed') {
print qq~
~;
foreach $line (@News) {
($Nick,$time,$title,$message) = split(/\|/,$line);
print qq~
<table width=95% border=0 ALIGN=CENTER CELLPADDING=1 CELLSPACING=0>
<TR>
<TD COLSPAN=2 ALIGN=CENTER>
<HR WIDTH=98%>
</TD>
</TR>
<tr>
<td WIDTH=50 ALIGN=RIGHT>
<IMG SRC="../Gfx/subject.jpg" ALT="Subject">
</TD>
<td ALIGN=LEFT WIDTH="*">
<font size=+1>$title</font>
</td>
</tr>
<TR>
<TD ALIGN=RIGHT>
<IMG SRC="../Gfx/Date.jpg" ALT="Date">
</TD>
<TD ALIGN=LEFT VALIGN=MIDDLE>
$time
</TD>
</TR>
<tr>
<TD></TD>
<td>
$message
</td>
</tr>
</TABLE>
~;
}
print qq~
<table width=95% border=0 ALIGN=CENTER CELLPADDING=1 CELLSPACING=0>
<tr>
<TD ALIGN=CENTER>
<HR WIDTH=98%>
<BR>OriginalScript
<a href="http://www.perlboy.org/main.html">Perlboy.org</a><BR>
Modified By Mike Woods 2001
</td>
</tr>
</table>
~;
}
else {
print qq~
<table width="82%" border="$border">
<tr>
<td><font color="$titletextcolour"><b>Latest News:</b></font></td>
</tr>
</table>
<br>
~;
foreach $line (@News) {
($Nick,$time,$title,$message) = split(/\|/,$line);
print qq~
<table width="82%" border="$border">
<tr>
<td>
<p align="$messagealignment"><b>$time<br>
</b>$message</p>
</td>
</tr>
</table>
<br>
~;
}
print qq~
<table width="82%" border="$border">
<tr>
<font color="$messagetextcolour"><div align="$messagealignment">This script was provided by
<a href="http://www.perlboy.org/main.html">Perlboy.org</a></div>
</td>
</tr>
</table>
~;
}